class ImportRatings < ActiveRecord::Migration
  def self.up
    sql = <<-SQL
      insert into ratings (drug_id, score, reason, side_effect_text, comment, sex, age, days_taken, times_taken, date_added) select drug_id, score, reason, side_effect, comment, sex, age, days_taken, times_taken, date_added from askapatient.ratings 
    SQL
    execute(sql)
  end

  def self.down
    Rating.delete_all
  end
end
